home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / program / tcpdumpb.zip / libpcap / INSTALL < prev    next >
Text File  |  1996-07-23  |  11KB  |  269 lines

  1. @(#) $Header: INSTALL,v 1.27 96/07/23 14:36:02 leres Exp $ (LBL)
  2.  
  3. To build libpcap, first customize any paths in Makefile.in, then run
  4. "./configure" (a shell script). The configure script will determine
  5. your system attributes and generate an appropriate Makefile from
  6. Makefile.in. Next run "make". If everything goes well you can su to
  7. root and run "make install", "make install-incl" and "make
  8. install-man". However, you need not install libpcap if you just want to
  9. build tcpdump; just make sure the tcpdump and libpcap directory trees
  10. have the same parent directory.
  11.  
  12. If configure says:
  13.  
  14.     configure: warning: cannot determine packet capture interface
  15.     configure: warning: (see INSTALL for more info)
  16.  
  17. then your system either does not support packet capture or your system
  18. does support packet capture but libpcap does not support that
  19. particular type. (If you have HP-UX, see below.) If your system uses a
  20. packet capture not supported by libpcap, please send us patches; don't
  21. forget to include an autoconf fragment suitable for use in
  22. configure.in.
  23.  
  24. You will need an ANSI C compiler to build libpcap. The configure script
  25. will abort if your compiler is not ANSI compliant. If this happens, use
  26. the GNU C compiler, available via anonymous ftp:
  27.  
  28.     ftp://prep.ai.mit.edu/pub/gnu/gcc-*.tar.gz
  29.  
  30. Note well: If you use gcc, you may need to run its "fixincludes"
  31. script. Running fixincludes is not required with later versions of gcc
  32. and in some cases (e.g. Solaris 2.5) causes problems when run. The
  33. configure script will abort if it detects if the fixincludes needs to
  34. be run. If the fixincludes test in configure passes, you're probably
  35. ok.
  36.  
  37. If you use flex, you must use version 2.4.6 or higher. The configure
  38. script automatically detects the version of flex and will not use it
  39. unless it is new enough. You can use "flex -V" to see what version you
  40. have (unless it's really old). The current version of flex is available
  41. via anonymous ftp:
  42.  
  43.     ftp://ftp.ee.lbl.gov/flex-*.tar.Z
  44.  
  45. As of this writing, the current version is 2.5.3.
  46.  
  47. If you use bison, you must use flex (and visa versa). The configure
  48. script automatically falls back to lex and yacc if both flex and bison
  49. are not found.
  50.  
  51. If your system only has AT&T lex, that also works okay unless your
  52. libpcap program uses other lex/yacc generated code. (Although it's
  53. possible to map the yy* identifiers with a script, we use flex and
  54. bison so we don't feel this is necessary.)
  55.  
  56. Some systems support the Berkeley Packet Filter natively; for example
  57. out of the box OSF and BSD/OS have bpf. If your system does not support
  58. bpf, you will need to pick up:
  59.  
  60.     ftp://ftp.ee.lbl.gov/bpf-*.tar.Z
  61.  
  62. Note well: you MUST have kernel source for your operating system in
  63. order to install bpf. An exception is SunOS 4; the bpf distribution
  64. includes replacement kernel objects for some of the standard SunOS 4
  65. network device drivers. See the bpf INSTALL document for more
  66. information.
  67.  
  68. If you use Solaris, there is a bug with bufmod(7) that is fixed in
  69. 5.3.2.  Setting a snapshot length with the broken bufmod(7) results in
  70. data be truncated from the FRONT of the packet instead of the end.  The
  71. work around is to not set a snapshot length but this results in
  72. performance problems since the entire packet is copied to user space.
  73. If you must run an older version of Solaris, there is a patch available
  74. from Sun; ask for bugid 1149065. After installing the patch, use
  75. "setenv BUFMOD_FIXED" to enable use of bufmod(7). However, we recommend
  76. you run a more current release of Solaris.
  77.  
  78. Under OSF, packet capture must be enabled before it can be used. For
  79. instructions on how to enable packet filter support, see:
  80.  
  81.     ftp://ftp.digital.com/pub/Digital/dec-faq/Digital-UNIX
  82.  
  83. Once you enable packet filter support, your OSF system will support bpf
  84. natively.
  85.  
  86. Under Ultrix, packet capture must be enabled before it can be used. For
  87. instructions on how to enable packet filter support, see:
  88.  
  89.     ftp://ftp.digital.com/pub/Digital/dec-faq/ultrix
  90.  
  91. If you use HP-UX, have at least version 9 and either have the version
  92. of cc that supports ANSI C (cc -Aa) or else get the GNU C compiler. In
  93. addition, you must buy the optional streams package. If you don't have:
  94.  
  95.     /usr/include/sys/dlpi.h
  96.     /usr/include/sys/dlpi_ext.h
  97.  
  98. then you don't have the streams package. It's also possible that the
  99. streams package is standard starting with a particular subrelease of
  100. HP-UX 10.
  101.  
  102. The HP implementation of DLPI is a little bit eccentric. Unlike
  103. Solaris, you must attach /dev/dlpi instead of the specific /dev/*
  104. network pseudo device entry in order to capture packets. The ppa is
  105. based on the ifnet "index" number. Under HP-UX 9, it is necessary to
  106. read /dev/kmem and the kernel symbol file (/hp-ux). Under HP-UX 10,
  107. dlpi can provide information for determining the ppa. It does not seem
  108. to be possible to trace the loopback interface. Unlike other DLPI
  109. implementations, PHYS implies MULTI and SAP and you get an error if you
  110. try to enable more than one promiscous more than one promiscuous mode
  111. at a time. This results in error messages:
  112.  
  113.     WARNING: DL_PROMISC_MULTI failed (recv_ack: promisc_multi: Invalid argument)
  114.     WARNING: DL_PROMISC_SAP failed (recv_ack: promisc_sap: Invalid argument)
  115.  
  116. which may be safely ignored. Finally, testing shows that there can't be
  117. more than one simultaneous dlpi user per network interface.
  118.  
  119. If you use Linux, you will not be able to build libpcap from this
  120. release. We have a Linux system up and hope to support Linux at some
  121. point after the next even version of the Linux kernel source is
  122. released. Meanwhile, you can try picking up:
  123.  
  124.     ftp://sunsite.unc.edu/pub/Linux/system/Network/management/tcpdump-3.0.2-linux.tar.gz
  125.  
  126. This appears to be libpcap 0.0.6 and tcpdump 3.0.2 hacked for Linux.
  127. (It includes 20000 lines of linux-specific include files, almost twice
  128. the source in the official libpcap distribution. It also contains a
  129. linux specific libpcap module that is essentially a hacked copy of the
  130. snoop module; one of the hacks is to replace the Regents of the
  131. University of California copyright with a vague reference to the GNU
  132. license.)
  133.  
  134. Note well: there is rumoured to be a version of tcpdump floating around
  135. called 3.0.3 that includes libpcap and is supposed to support Linux.
  136. You should be advised that the Network Research Group at LBNL never
  137. generated a release with this version number. You should also know that
  138. a standard trick crackers use to get people to install trojans is to
  139. distribute bogus packages that have a version number higher than the
  140. current release.
  141.  
  142. If you use AIX, you will not be able to build libpcap from this
  143. release. We have a set of contributed patches that we hope to integrate
  144. in some future release of libpcap.
  145.  
  146. If you use NeXTSTEP, you will not be able to build libpcap from this
  147. release. We hope to support this operating system in some future
  148. release of libpcap.
  149.  
  150. If you use SINIX, you should be able to build libpcap from this
  151. release. We are told you must have the C-DS V1.1A00 compiler. If you
  152. have problems, please send details to libpcap@ee.lbl.gov.
  153.  
  154. If you use SCO, you might have trouble building libpcap from this
  155. release. We do not have a machine running SCO and have not had reports
  156. of anyone successfully building on it. Since SCO apparently supports
  157. dlpi, it's possible libpcap 0.2 works. Meanwhile, sco provides a
  158. tcpdump binary as part of their "Network/Security Tools" package:
  159.  
  160.     http://www.sco.com/technology/internet/goodies/#SECURITY
  161.  
  162. There is also a README that explains how to enable packet capture.
  163.  
  164. If you use UnixWare, you will not be able to build libpcap from this
  165. release. We hope to support this operating system in some future
  166. release of libpcap. Meanwhile, there appears to be an UnixWare port of
  167. libpcap 0.0 (and tcpdump 3.0) in:
  168.  
  169.     ftp://ftp1.freebird.org/pub/mirror/freebird/internet/systools/
  170.  
  171. UnixWare appears to use a hacked version of DLPI.
  172.  
  173. If you use flex and bison and not gcc but the linker cannot find
  174. alloca(), you need to either use gcc or not use flex and bison.
  175.  
  176. If linking tcpdump fails with "Undefined: _alloca" when using bison on
  177. a Sun4, your version of bison is broken. In any case version 1.16 or
  178. higher is recommended (1.14 is known to cause problems 1.16 is known to
  179. work). Either pick up a current version from:
  180.  
  181.     ftp://prep.ai.mit.edu/pub/gnu/bison.tar.gz
  182.  
  183. or hack around it by inserting the lines:
  184.  
  185.     #ifdef __GNUC__
  186.     #define alloca __builtin_alloca
  187.     #else
  188.     #ifdef sparc
  189.     #include <alloca.h>
  190.     #else
  191.     char *alloca ();
  192.     #endif
  193.     #endif
  194.  
  195. right after the (100 line!) GNU license comment in bison.simple, remove
  196. grammar.[co] and fire up make again.
  197.  
  198. If you use SunOS 4, your kernel must support streams NIT. If you run a
  199. libpcap program and it dies with:
  200.  
  201.     /dev/nit: No such device
  202.  
  203. You must add streams NIT support to your kernel configuration, run
  204. config and boot the new kernel.
  205.  
  206. If you are running a version of SunOS earlier than 4.1, you will need
  207. to replace the Sun supplied /sys/sun{3,4,4c}/OBJ/nit_if.o with the
  208. appropriate version from this distribution's SUNOS4 subdirectory and
  209. build a new kernel:
  210.  
  211.     nit_if.o.sun3-sunos4        (any flavor of sun3)
  212.     nit_if.o.sun4c-sunos4.0.3c    (SS1, SS1+, IPC, SLC, etc.)
  213.     nit_if.o.sun4-sunos4        (Sun4's not covered by
  214.                         nit_if.o.sun4c-sunos4.0.3c)
  215.  
  216. These nit replacements fix a bug that makes nit essentially unusable in
  217. pre-SunOS 4.1.  In addition, our sun4c-sunos4.0.3c nit gives you
  218. timestamps to the resolution of the SS-1 clock (1 us) rather than the
  219. lousy 20ms timestamps Sun gives you  (tcpdump will print out the full
  220. timestamp resolution if it finds it's running on a SS-1).
  221.  
  222. FILES
  223. -----
  224. CHANGES        - description of differences between releases
  225. FILES        - list of files exported as part of the distribution
  226. INSTALL        - this file
  227. Makefile.in    - compilation rules (input to the configure script)
  228. README        - description of distribution
  229. SUNOS4        - pre-SunOS 4.1 replacement kernel nit modules
  230. VERSION        - version of this release
  231. aclocal.m4    - autoconf macros
  232. bpf/net        - copies of bpf_filter.c and bpf.h
  233. bpf_filter.c    - symlink to bpf/net/bpf_filter.c
  234. bpf_image.c    - bpf disassembly routine
  235. config.guess    - autoconf support
  236. config.sub    - autoconf support
  237. configure    - configure script (run this first)
  238. configure.in    - configure script source
  239. etherent.c    - /etc/ethers support routines
  240. ethertype.h    - ethernet protocol types and names definitions
  241. gencode.c    - bpf code generation routines
  242. gencode.h    - bpf code generation definitions
  243. grammar.y    - filter string grammar
  244. inet.c        - network routines
  245. install-sh    - BSD style install script
  246. lbl/gnuc.h    - gcc macros and defines
  247. lbl/os-*.h    - os dependent defines and prototypes
  248. mkdep        - construct Makefile dependency list
  249. nametoaddr.c    - hostname to address routines
  250. net        - symlink to bpf/net
  251. optimize.c    - bpf optimization routines
  252. pcap-bpf.c    - BSD Packet Filter support
  253. pcap-dlpi.c    - Data Link Provider Interface support
  254. pcap-enet.c    - enet support
  255. pcap-int.h    - internal libpcap definitions
  256. pcap-namedb.h    - public libpcap name database definitions
  257. pcap-nit.c    - Network Interface Tap support
  258. pcap-nit.h    - Network Interface Tap definitions
  259. pcap-null.c    - dummy monitor support (allows offline use of libpcap)
  260. pcap-pf.c    - Packet Filter support
  261. pcap-pf.h    - Packet Filter definitions
  262. pcap-snit.c    - Streams based Network Interface Tap support
  263. pcap-snoop.c    - Snoop network monitoring support
  264. pcap.3        - manual entry
  265. pcap.c        - pcap utility routines
  266. pcap.h        - public libpcap definitions
  267. savefile.c    - offline support
  268. scanner.l    - filter string scanner
  269.